<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="d" uri="/WEB-INF/resource.tld"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

<title>支付结果页</title>
  
  <meta name="description" content="">
  <meta name="keyword" content="关键字1，关键字2，—">

</head>
<!-- end header -->
<body>
  <div class="page-group">
    <div class="page page-current moyu-page" style="background-color: #F8F8F8;">
      <header class="bar bar-nav shop-header">
        <h1 class="title">支付结果页</h1>
      </header>
      
      <div class="content" style="background-color: #F8F8F8;">
        <div class="card">
          <div class="card-header">
          <img src="${ctx.resource}/image/logo.png" alt="" />
          </div>
          <div class="card-content">
            <div class="list-block media-list">
              <ul>
                <li class="item-content">
                  <div class="item-media">
                    <img src="${ctx.resource}/image/moyu/moyu-1.jpeg" width="44">
                  </div>
                  <div class="item-inner">
                    <div class="item-title-row">
                      <div class="item-title">人马君 乐在美味即食魔芋拌面（肽+） 轻卡低热量 减脂餐 魔芋面主食品方便即食速食</div>
                    </div>
                    <div class="item-subtitle">
                      <c:choose>
                        <c:when test="${order.type == 1}">
                          香辣钵钵鸡味6盒
                        </c:when>
                        <c:when test="${order.type == 2}">
                          葱油鸡汁味6盒
                        </c:when>
                        <c:when test="${param.type == 3}">
                          香辣钵钵鸡味3盒+葱油鸡汁味3盒
                        </c:when>
                        <c:otherwise>
                        
                        </c:otherwise>
                      </c:choose>
                    </div>
                    <div class="item-subtitle clearfix">
                      <p class="pull-left single-price">
                        <span>￥</span>118
                      </p>
                      <p class="pull-right amount">
                        <span>x</span>${order.amount}
                      </p>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
          </div>
          <div class="card-footer">
            <div></div>
            <div>
              <span class="total-amount">共${order.amount}件</span> <span>商品小计：<span class="price-symbol">￥<span class="price">
                <fmt:formatNumber value="${order.price/100}" pattern="00.00"></fmt:formatNumber>
              </span></span></span>
            </div>
          </div>
        </div>

    <div class="card">
      <div class="card-header">支付结果</div>
      <div class="card-content">
        <div class="card-content-inner clearfix"  style="padding: 0 0.75rem 0.75rem 0.75rem;">
          <c:choose>
            <c:when test="${order.orderStatus eq 'PAID'}">
            <div>
            <p style="text-align: center; margin: 0 auto;"><span class="color-success icon icon-check" style="
    font-size: 40px;
    font-weight: bolder;
    border: 3px solid #4cd964;
    height: 60px;
    width: 60px;
    line-height: 55px;
    display: block;
    text-align: center;
    border-radius: 60px;
    margin: 0 auto;
            "></span></p>
            <p style="text-align: center;">支付成功</p>
          </div>
            </c:when>
            <c:otherwise>
            <div>
            <p style="text-align: center; margin: 0 auto;"><span class="color-success icon icon-refresh" style="
    font-size: 40px;
    font-weight: bolder;
    color: #999;
    height: 60px;
    width: 60px;
    line-height: 55px;
    display: block;
    text-align: center;
    border-radius: 60px;
     margin: 0 auto;
            "></span></p>
            <p style="text-align: center;">支付异常，请联系客服</p>
          </div> 
            </c:otherwise>
          </c:choose>
        </div>
      </div>
    </div>
    
    <div class="content-block">
    <p><a href="${ctx.host}/moyu/orders" class="button button-big button-success button-fill">查看所有订单</a></p>
    </div>

      </div>
      <!-- End Content -->
      
    </div>
  </div>
  

  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/product/moyu-order.js" />
  <script type="text/javascript">
      var jsConfig = JSON.parse('${wechatJsConfig}')
      require(['page/product/moyu-order'], function(page) {
        page.init({
          jsConfig: jsConfig
        })
      })
    </script>

</body>
</html>